package com.unirio.pm.rules;

import com.unirio.pm.interfaces.PasswordRule;

public class MultipleRules implements PasswordRule {

	private PasswordRule[] rules;
	
	public MultipleRules(PasswordRule[] rules) {
		this.rules = rules;
	}

	public int checkRule(String password) {
		int score = 0;
    	for(int i=0; i<rules.length; i++) {
    		score += rules[i].checkRule(password);
    	}
    	return score;
	}

}
